from pymongo import MongoClient
from random import randint

conn = MongoClient('192.168.0.113', 27017)
db=conn.studyurl
dbset=db.mp4url
rint=randint(1,int(dbset.find_one({'url':'count'})['num']))
print(dbset.find_one({'num':str(rint)})['url'])